import requests

headers = {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "priority": "u=1, i",
    "referer": "https://www.xinpianchang.com/discover/article-1-0-all-all-0-0-pick",
    "sec-ch-ua": "\"Microsoft Edge\";v=\"137\", \"Chromium\";v=\"137\", \"Not/A)Brand\";v=\"24\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0",
    "x-nextjs-data": "1"
}
cookies = {
    "FECWS": "e2a10b5ea0320f7cfcbaacd435e505cc6f16392185e39269b15b01d8408a5f6b913155509b8548336090c527c11d7e2091886bf4decdc7f2e787738c0c6362c69946e692365c960f160ca0f1f934f7ea40",
    "Device_ID": "2ew3i542d8cimc38jf05",
    "Hm_lvt_446567e1546b322b726d54ed9b5ad346": "1750328741",
    "HMACCOUNT": "A8EA38DBEA1C6BFA",
    "sajssdk_2015_cross_new_user": "1",
    "Authorization": "39348DDF57B8A763F57B8A4B8757B8ABE3457B8AC548ACBADDF7",
    "PHPSESSID": "t2790i72jp64il7dffaiamibbl",
    "_ga": "GA1.2.1665240537.1750331566",
    "_gid": "GA1.2.230962899.1750331566",
    "sensorsdata2015jssdkcross": "%7B%22distinct_id%22%3A%2219787b910d92d3e-0a44563f11c4dd-4c657b58-2073600-19787b910da2be4%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%2219787b910d92d3e-0a44563f11c4dd-4c657b58-2073600-19787b910da2be4%22%7D",
    "showFirstAds": "0",
    "lastHomeTab": "recommend",
    "Hm_lpvt_446567e1546b322b726d54ed9b5ad346": "1750333508",
    "FECAS": "5iDKoJLdUUPeej0fKafbOpQ9Fltt5O9WMfG3iDZ4lD51WzpPpApA+lIiTd7JsW1vj6jmoJETZCylIiZOHqtzzUI/2Gmier+TfG51TGKmk7pxE1U1AAUv2CECQiOaRLU9MfpCovR5RIlNAAIi2B5T1O/vjzfw2aUJc+LEKKatx19cHajIqkDqeD7DvCJwqRb1z2"
}
url = "https://www.xinpianchang.com/_next/data/73ybPW-oZR_83fJJWbzkr/discover/article/0-0-all-all-0-0-pick.json"
params = {
    "param": "0-0-all-all-0-0-pick",
    "FECU": "5iDKoJLdUUPeej0fKafbOpQ9Fltt5O9WMfG3iDZ4lD51WzpPpApA+lIiTd7JsW1vj6jmoJETZCylIiZOHqtzzUI/2Gmier+TfG51TGKmk7pxE1U1AAUv2CECQiOaRLU9MfpCovR5RIlNAAIi2B5T1O1CPZp8jaIshuvfeMeBllYkWaL+tyPCPO3bB1GMrnmEB2"
}

proxies = {
    "http": "http://t15029873262763:l6mtknab@w110.kdltps.com:15818",
    "https": "http://t15029873262763:l6mtknab@w110.kdltps.com:15818"
}

response = requests.get(url, headers=headers, cookies=cookies, params=params, proxies=proxies)

data = response.json()["pageProps"]["discoverArticleData"]["list"]
for temp in data:
    title = temp["title"]
